
package at.fhj.ase.clientarch.client;

import java.rmi.ConnectException;

import javax.swing.JOptionPane;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import at.fhj.ase.clientarch.client.gui.ClientController;

/**
 * @author cja, sfe | www.fh-joanneum.at | Client Architectures and Design
 */
public class Client {
  private static final Logger logger = LoggerFactory.getLogger(Client.class.getName());

  private Client() throws ConnectException {
    ClientController.INSTANCE.startApplication();
  }

  public static void main(String[] args) {
    try {
      new Client();
    } catch (Throwable t) {
      logger.error("Could not start application due to following error: ", t);
      JOptionPane.showMessageDialog(null, "The client application is not startable - connection problem/server started?", "Client not startable",
                                    JOptionPane.ERROR_MESSAGE);
    }
  }
}
